﻿Imports BUS
Imports DTO

Public Class frmTHEMNHANVIEN

    Private Sub frmTHEMNHANVIEN_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadDSNV()
    End Sub

    Public Sub LoadDSNV()
        dgv_NV.DataSource = NhanVienBUS.LAYTATCA()
    End Sub

    Private Sub btn_them_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_them.Click
        Dim nv As New NhanVienDTO()
        nv.TenNV = txt_TenNV.Text
        nv.SDT = txt_sdt.Text
        nv.DiaChi = txt_diachi.Text
        nv.NgayVaoLam = dtp_ngayvaplam.Value
        NhanVienBUS.THEM(nv)
        LoadDSNV()
        MessageBox.Show("Da Them Thanh Cong!")
    End Sub

    Private Sub btn_xoa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_xoa.Click
        Dim dt1 As New DataTable
        'dgv_NV.DataSource = Integer.Parse(dt1)
        ' NhanVienBUS.XOA(dt1)
        MessageBox.Show("Da Xoa Thành Công")
    End Sub

End Class